﻿#region

using System;

#endregion

namespace BuildMotion.MotionTracker.Common
{
    /// <summary>
    /// Use to store browser information for the web request. 
    /// </summary>
    public class Browser
    {
        private bool activeXControls;
        private Guid browserId;
        private bool cookies;
        private string ecmaScriptVersion;
        private bool frames;
        private bool isMobileDevice;
        private string jScriptVersion;
        private string majorVersion;
        private string minorVersion;
        private string msDomVersion;
        private string name;
        private string platform;
        private bool requiresContentTypeMetaTag;
        private bool supportsCallback;
        private bool supportsRedirectWithCookie;
        private bool supportsXmlHttp;
        private string type;
        private string version;
        private string w3CDomVersion;

        /// <summary>
        /// Gets or sets the browser id.
        /// </summary>
        /// <value>The browser id.</value>
        public Guid BrowserId
        {
            get { return browserId; }
            set { browserId = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether [active X controls].
        /// </summary>
        /// <value><c>true</c> if [active X controls]; otherwise, <c>false</c>.</value>
        public bool ActiveXControls
        {
            get { return activeXControls; }
            set { activeXControls = value; }
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="Browser"/> is cookies.
        /// </summary>
        /// <value><c>true</c> if cookies; otherwise, <c>false</c>.</value>
        public bool Cookies
        {
            get { return cookies; }
            set { cookies = value; }
        }

        /// <summary>
        /// Gets or sets the ECMA script version.
        /// </summary>
        /// <value>The ECMA script version.</value>
        public string EcmaScriptVersion
        {
            get { return ecmaScriptVersion; }
            set { ecmaScriptVersion = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="Browser"/> is frames.
        /// </summary>
        /// <value><c>true</c> if frames; otherwise, <c>false</c>.</value>
        public bool Frames
        {
            get { return frames; }
            set { frames = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is mobile device.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is mobile device; otherwise, <c>false</c>.
        /// </value>
        public bool IsMobileDevice
        {
            get { return isMobileDevice; }
            set { isMobileDevice = value; }
        }

        /// <summary>
        /// Gets or sets the J script version.
        /// </summary>
        /// <value>The J script version.</value>
        public string JScriptVersion
        {
            get { return jScriptVersion; }
            set { jScriptVersion = value; }
        }

        /// <summary>
        /// Gets or sets the major version.
        /// </summary>
        /// <value>The major version.</value>
        public string MajorVersion
        {
            get { return majorVersion; }
            set { majorVersion = value; }
        }

        /// <summary>
        /// Gets or sets the minor version.
        /// </summary>
        /// <value>The minor version.</value>
        public string MinorVersion
        {
            get { return minorVersion; }
            set { minorVersion = value; }
        }

        /// <summary>
        /// Gets or sets the MS DOM version.
        /// </summary>
        /// <value>The MS DOM version.</value>
        public string MSDomVersion
        {
            get { return msDomVersion; }
            set { msDomVersion = value; }
        }

        /// <summary>
        /// Gets or sets the platform.
        /// </summary>
        /// <value>The platform.</value>
        public string Platform
        {
            get { return platform; }
            set { platform = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether [requires content type meta tag].
        /// </summary>
        /// <value>
        /// 	<c>true</c> if [requires content type meta tag]; otherwise, <c>false</c>.
        /// </value>
        public bool RequiresContentTypeMetaTag
        {
            get { return requiresContentTypeMetaTag; }
            set { requiresContentTypeMetaTag = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether [supports callback].
        /// </summary>
        /// <value><c>true</c> if [supports callback]; otherwise, <c>false</c>.</value>
        public bool SupportsCallback
        {
            get { return supportsCallback; }
            set { supportsCallback = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether [supports redirect with cookie].
        /// </summary>
        /// <value>
        /// 	<c>true</c> if [supports redirect with cookie]; otherwise, <c>false</c>.
        /// </value>
        public bool SupportsRedirectWithCookie
        {
            get { return supportsRedirectWithCookie; }
            set { supportsRedirectWithCookie = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether [supports XML HTTP].
        /// </summary>
        /// <value><c>true</c> if [supports XML HTTP]; otherwise, <c>false</c>.</value>
        public bool SupportsXmlHttp
        {
            get { return supportsXmlHttp; }
            set { supportsXmlHttp = value; }
        }

        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        /// <value>The type.</value>
        public string Type
        {
            get { return type; }
            set { type = value; }
        }

        /// <summary>
        /// Gets or sets the version.
        /// </summary>
        /// <value>The version.</value>
        public string Version
        {
            get { return version; }
            set { version = value; }
        }

        /// <summary>
        /// Gets or sets the w3 C DOM version.
        /// </summary>
        /// <value>The w3 C DOM version.</value>
        public string W3CDomVersion
        {
            get { return w3CDomVersion; }
            set { w3CDomVersion = value; }
        }
    }
}